Date: 2018-08-02
R version: 3.5.0
Corresponding author: matthew.malishev@gmail.com
This document can be found at https://github.com/darwinanddavis/UsefulCode

TO DO

How much of the population does the sampling effort capture?

Overview

This document uses the schisto mesocosm 2016 data to explore cercariae production from snail hosts of different body sizes (diameter in mm and mass in mg) over a 14 week period under high and low N/P nutrient conditions. Host reproduction (egg masses) is also calculated.

Install dependencies

Get data

wd <- params$dir # working dir is set in yaml header
setwd(paste0(wd,"/"))
f <- "meso1.csv"
f2 <- "meso2.csv" 

Load data

'data.frame':   768 obs. of  9 variables:
 $ Tank   : int  1 2 3 4 5 6 7 8 9 10 ...
 $ NP     : chr  "High" "Low" "Low" "High" ...
 $ Size   : chr  "Small" "Intermediate" "Intermediate" "Small" ...
 $ Schisto: chr  "No" "Yes" "Yes" "Yes" ...
 $ Date   : chr  "24/05/16" "24/05/16" "24/05/16" "24/05/16" ...
 $ Week   : int  1 1 1 1 1 1 1 1 1 1 ...
 $ Eggs   : int  0 0 1 0 0 0 7 10 1 0 ...
 $ Phyto_F: num  2585 1005 1327 1399 2341 ...
 $ Peri_F : num  7301 4711 7253 8212 4293 ...

Outlier

[1] "Outlier"
      Tank Picture_Name     Date Snail Diameter Cercariae Week Sampling_Effort     Mass
16895   38     P1001057 29/06/16   143    50.54         0    6               3 1239.301

Cleaning Snail and Date cols

           Tank    Picture_Name            Date           Snail        Diameter       Cercariae 
          84102          367153          358163           86955          239237           46575 
           Week Sampling_Effort            Mass 
          58976           46116          668838 

Set Cex sizes

Set plotting graphics

Set plotting parameters

Get only infected snails


 

Mesocosm1 data sheet

Snail size per tank

Shell diameter (mm) per tank


    Welch Two Sample t-test

data:  Diameter and Tank
t = -292.62, df = 54631, p-value < 2.2e-16
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 -19.45781 -19.19889
sample estimates:
mean of x mean of y 
 5.822942 25.151292 

Snail diameter (mm) distribution

  xchar= 1.181 ; (yextra,ychar)= -0.004785 0.004785 
  points2( 46.27 46.27 , 0.1 0.09522 , pch= 20 20 , ...) 

Snail size over time (weeks)

Shell diameter (mm) over time (weeks)
~1000 eggs inoculated at 0,2,4,6 weeks

Snail size over time (weeks) per tank

Snail size density over time for all tanks (total = 48) have been saved as ‘Size_per_tank_over_time.pdf’ in /Users/malishev/Documents/Emory/research/mesocosm

  ~1000 eggs inoculated at 0,2,4,6 weeks

# Select tank #. Max 48   
tank <- 45

Body mass (mg) over time (weeks)

(Soft tissue dry mass in mg = 0.0096 * Diameter[in mm]^3)
~1000 eggs inoculated at 0,2,4,6 weeks

Outer
Outlier

Without outlier

Outlier

          Mass Cercariae
16895 1239.301         0

Snail size and number of cercariae produced

Point size by cercariae number
Linear log

Snail mass and cercariae produced (mg)

Snail size per tank

Shell diameter (mm)
Select tank #. max 48

Cercariae production over time

Cercariae shed over 90 mins per week
~1000 eggs inoculated at 0,2,4,6 weeks
Snail abundance over time (weeks)

Tank cercariae production over time per tank

Select tank #. max 48

[1] 400

Mesocosm 2 data sheet

Clean data

Egg mass distribution

N/P concentration v egg mass

Phyto and Peri Distribution

phyto = flourescence units
peri = flourescence per 2 weeks / 3.5 inch^2 tile (gross productivity biomass rate)

Egg Mass over time v presence of schisto

~1000 eggs inoculated at 0,2,4,6 weeks

Size class vs Egg mass (with schisto)

  xchar= 3.937 ; (yextra,ychar)= -0.001435 0.001435 
  points2( 147.7 147.7 147.7 , 0.03072 0.02928 0.02785 , pch= 20 20 20 , ...) 

Egg Mass per Week

~1000 eggs inoculated at 0,2,4,6 weeks